<script setup lang="ts">
import { NButton, NButtonGroup, NResult } from 'naive-ui';
import router from '../router';

const handleCheckOrder = () => router.push({ name: 'user' });
const handleGoToIndex = () => router.push('/');
</script>

<template>
  <n-result
    status="success"
    title="下单成功"
  >
    <template #footer>
      <n-button-group>
        <n-button
          type="primary"
          @click="handleCheckOrder"
        >
          查看订单详情
        </n-button>
        <n-button
          @click="handleGoToIndex"
        >
          返回首页
        </n-button>
      </n-button-group>
    </template>
  </n-result>
</template>